//
//  PPUpdateViewController.m
//  PPDL
//
//  Created by 王洋 on 2019/8/28.
//  Copyright © 2019 王洋. All rights reserved.
//


#define Update_Item_Width     TTScreenWidth - 100

#import "PPUpdateViewController.h"

@interface PPUpdateViewController ()

@property (nonatomic ,strong) UIViewController *vc;

@property (nonatomic, assign) CGFloat   defaultHeight;

@end

@implementation PPUpdateViewController

- (instancetype)initDefaultIndex:(NSInteger)index defaultHeight:(CGFloat)height vc:(UIViewController *)vc dataSource:(NSMutableDictionary *)dic {
//    self.preAuthItemListArray = @[].mutableCopy;
    if (self = [super init]) {
        self.vc = vc;
//        self.preAuthItemListArray = dataSource.mutableCopy;
//        self.defaultIndex = index;
//        self.defaultHeight = height;
    }
    return self;
}

- (void)viewDidLoad {
    
    [super viewDidLoad];
    
    [self initPop];
//    [self setUpUI];
}

- (void)initPop {
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.defaultHeight = 400;
    
    if (self.defaultHeight > TTScreenHeight / 2) {
        self.defaultHeight = TTScreenHeight / 2;
    }
    
    self.contentSizeInPopup = CGSizeMake(Update_Item_Width, self.defaultHeight);
    self.popupController.navigationBarHidden = YES;
    self.popupController.containerView.backgroundColor = [UIColor clearColor];
    [self.popupController.backgroundView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backgroundTap)]];
}

- (void)backgroundTap  {
    [self.popupController dismiss];
}

@end
